Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: validate annual limit #2002

Merged
merged 19 commits into from
Dec 3, 2024
Merged

feat: validate annual limit #2002

merged 19 commits into from
Dec 3, 2024

Conversation

andrewleith
Copy link
Member

@andrewleith andrewleith commented Nov 26, 2024

Summary | Résumé

This PR adds annual-limit checking to bulk sends. A follow-up PR will be made to address one-off sends in coordination with API changes being currently made.

Test instructions | Instructions pour tester la modification

Pre-setup:

  • Service with no messages sent
  • Annual limit of 5
  • Daily limit of 4

Scenarios

User attempts to send more EMAILS than DAILY limit allows

  • Send bulk of 5 emails
  • Ensure daily limit error is displayed and no notifications sent
  • Send bulk 5 SMSs
  • Ensure daily limit error is displayed and no notifications sent

User attempts to send more EMAILS than ANNUAL limit allows

  • Send bulk of 6 emails
  • Ensure annual limit error is displayed and no notifications sent
  • Send bulk of 6 SMSs
  • Ensure annual limit error is displayed and no notifications sent

@andrewleith andrewleith marked this pull request as draft November 26, 2024 19:24
Copy link

@andrewleith andrewleith marked this pull request as ready for review November 28, 2024 19:48
Copy link
Contributor

@whabanks whabanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Tested locally and in the review app.
✅ Annual limit error messages work
✅ Annual limit error messages take precedence over daily limit messages
✅ Daily limit messages still display when the annual limit hasn't been hit yet.

@andrewleith andrewleith merged commit d3887e5 into main Dec 3, 2024
11 checks passed
@andrewleith andrewleith deleted the feat/validate-annual-limit branch December 3, 2024 15:24
andrewleith added a commit that referenced this pull request Dec 4, 2024
andrewleith added a commit that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants